Skip to content

Match offers with a dstack-owned OfferMatcher - #4528

Merged
r4victor merged 11 commits into
masterfrom
pr_offer_matcher
Nov 25, 2026
Merged

r4victor merged 11 commits into
masterfrom
pr_offer_matcher

Conversation

@r4victor

@r4victor r4victor commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #4519.

  • Match offers against requirements with a new OfferMatcher that reads offer fields directly instead of converting each offer to a gpuhunt CatalogItem for gpuhunt.matches(); results are identical, and a full pass over the ~55k-offer catalog drops from 86ms to 17ms for default requirements (75ms to 12ms for H100:8).
  • Build one matcher per call when matching instances (filter_instances(), shared instances, fleet spec checks) instead of rebuilding the gpuhunt query filter for every instance.
  • Look up GPU compute capability case-insensitively in gpu_matches_gpu_spec(), as offer matching already did, which slightly relaxes Kubernetes and Slurm GPU selection.
  • Read the GCP reserved-only offer flag from backend_data directly instead of validating a pydantic model for every matched offer (~20x faster per offer).
  • Remove offer_to_catalog_item() and filter_offers_by_requirements().

Next step: make the remaining backends that still match offers through gpuhunt use OfferMatcher: switch Lium and Seeweb to ComputeWithAllOffersCached, and apply OfferMatcher to the offers Vast.ai and Daytona get from gpuhunt.

@r4victor
r4victor merged commit 2adf02a into master Nov 25, 2026
26 checks passed
@r4victor
r4victor deleted the pr_offer_matcher branch November 25, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant